Skip to content

Conversation

jessevz
Copy link
Contributor

@jessevz jessevz commented Aug 30, 2023

Added frontend components for benchmark cache: hashtopolis/server#955

<div ngbDropdownMenu (mouseout)='onMouseLeave(drop)' class="dropdown-menu top-cat-sub" aria-labelledby="dropdownAgents">
<a class="dropdown-item" routerLink="agents/show-agents" [routerLinkActiveOptions]="{exact: true}" [routerLinkActive]="['active']">Show Agents</a>
<a class="dropdown-item" routerLink="agents/agent-status" [routerLinkActiveOptions]="{exact: true}" [routerLinkActive]="['active']">Agent Status</a>
<a class="dropdown-item" routerLink="agents/benchmarks" [routerLinkActiveOptions]="{exact: true}" [routerLinkActive]="['active']">benchmarks</a>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The title of the menu entry should be capitalized, i.e. Benchmarks

breadcrumb: 'Edit Agent'
},
canActivate: [AuthGuard,AgentGuard]},
]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code has change, so pull the new code and change should be sth like this.

    {
      path: 'benchmarks', component: BenchmarkComponent,
      data: {
        kind: 'benchmark',
        breadcrumb: 'Benchmark'
    },
    canActivate: [IsAuth,CheckPerm]},

}
}

// Set permissions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We dont need this code anymore as we have now guards and we leave the backend handle the permissions

}

onDelete(id: number){
if(this.manageBenchmarkAccess || typeof this.manageBenchmarkAccess == 'undefined'){
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, leave it to the back end hadling error

@@ -0,0 +1,48 @@
<div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center py-4">
<div class="d-block mb-4 mb-md-0">
<h2 class="h4">Benchmarks</h2>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can change this block for this template

<app-page-title [title]="Benchmarks'" [subbutton]="false">

<tr>
<th class="border-0 rounded-start"><input type="checkbox" (click)="setCheckAll()"> ID</th>
<th class="border-0">CMD</th>
<th class="border-0">Hashmode</th>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The class="border-0" is not needed

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use instead the service _services/main.service.ts instead

})
export class BenchmarkService {

private endpoint = environment.config.prodApiEndpoint + '/ui/benchmarks';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use the class SERV in _services/main.config.ts

Copy link
Contributor

@xbenyx xbenyx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are using an old branch here, see some guideline for changes. any questions let me know.

@s3inlc
Copy link
Member

s3inlc commented Oct 6, 2025

this PR is getting closed, the feature will be added at a later stage, matching to the new frontend implementation changes.

@s3inlc s3inlc closed this Oct 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants